home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
giochi
/
aboulder.lha
/
ABoulderDash1.0
/
boulderdash.i
< prev
next >
Wrap
Text File
|
1995-08-27
|
12KB
|
472 lines
*==========================================
*
* File: boulderdash.h
* Version: 1
* Revision: 0
* Created: 3-VII-1993
* By: FNC Slothouber
* Last Update: 30-VIII-1993
* By: FNC Slothouber
*
*==========================================
*
TRUE equ -1
FALSE equ 0
*== Grid Element Structure
rsreset
grid_draw rs.w 1
grid_trans rs.w 1
grid_type rs.w 1
grid_dirty rs.b 1
grid_data rs.b 1
grid_sizeof rs.l 0
** Display Size
D_x equ 32+320-16-16-16-16
D_y equ 16+240-16-16-16-16
NUM_COLORS equ 16
* Bitmap Size
BM_x equ 32+320+16+16 pixels
BM_y equ 16+240+16+16 pixels
BM_d equ 4 planes
BM_width equ BM_x/8 bytes
* Size of the status display bitmap
ST_BM_x equ D_x
ST_BM_y equ 16
ST_BM_d equ 4
*== Graphics Image Bitmap Size
GRAPHICS_x equ 320 pixels
GRAPHICS_y equ 256 pixels
GRAPHICS_d equ 4 planes
GRAPHICS_width equ GRAPHICS_x/8 bytes
* Size of the editor screen
BD_SCREEN_x equ GRAPHICS_x
BD_SCREEN_y equ 256
BD_SCREEN_d equ 4
* Size of a grid object
GRID_OBJECT_WIDTH equ 16 pixels
GRID_OBJECT_HEIGHT equ 16 lines
* Number of grid objects that fit on the editor screen
BD_EDIT_FIELD_WIDTH equ BD_SCREEN_x/GRID_OBJECT_WIDTH
BD_EDIT_FIELD_HEIGHT equ (BD_SCREEN_y-16-32)/GRID_OBJECT_HEIGHT
** Grid Field Size
GRIDF_WIDTH equ 40
GRIDF_HEIGHT equ 32
GRIDF_SIZE equ GRIDF_WIDTH*GRIDF_HEIGHT*grid_sizeof
NUMBER_OF_GRIDS equ GRIDF_WIDTH*GRIDF_HEIGHT
GRIDF_VISIBLE_WIDTH equ BM_x/GRID_OBJECT_WIDTH-2
GRIDF_VISIBLE_HEIGHT equ BM_y/GRID_OBJECT_HEIGHT-2
*== Scroll Borders
* the display will scroll when ted moves over one of these borders
SCROLL_LEFT equ (BM_width/2-2-7)*grid_sizeof
SCROLL_RIGHT equ 7*grid_sizeof
SCROLL_UP equ (BM_y/16-2-7)*grid_sizeof*GRIDF_WIDTH
SCROLL_DOWN equ 5*grid_sizeof*GRIDF_WIDTH
* scroll limits display
SCROLL_LEFT_MAX equ (GRIDF_WIDTH-GRIDF_VISIBLE_WIDTH)*grid_sizeof
SCROLL_RIGHT_MAX equ GRIDF_VISIBLE_WIDTH*grid_sizeof
SCROLL_UP_MAX equ (GRIDF_HEIGHT-GRIDF_VISIBLE_HEIGHT)*grid_sizeof*GRIDF_WIDTH
SCROLL_DOWN_MAX equ GRIDF_VISIBLE_WIDTH*grid_sizeof*GRIDF_WIDTH
* scroll limits editor screen
EDIT_SCROLL_LEFT_MAX equ 2*grid_sizeof
EDIT_SCROLL_RIGHT_MAX equ (GRIDF_WIDTH-BD_EDIT_FIELD_WIDTH-2)*grid_sizeof
EDIT_SCROLL_UP_MAX equ 2*grid_sizeof*GRIDF_WIDTH
EDIT_SCROLL_DOWN_MAX equ (GRIDF_HEIGHT-BD_EDIT_FIELD_HEIGHT-2)*grid_sizeof*GRIDF_WIDTH
DO_SCROLL equ 1
NO_SCROLL equ 0
*= ----
ONE_DOWN equ GRIDF_WIDTH*grid_sizeof
ONE_UP equ -(GRIDF_WIDTH*grid_sizeof)
ONE_LEFT equ -grid_sizeof
ONE_RIGHT equ grid_sizeof
* Game Time Flags
TIMESUP equ 0
TIMELEFT equ 1
* position of diff. object in the graphics bitmap
IM_BORDER equ 0
IM_FUNGIS equ 2
IM_EMPTY equ 640
IM_EXIT equ 4
IM_BRICK equ 1280
IM_DIRT equ 642
IM_ROCK0 equ 8
IM_ROCK4 equ 640+8
IM_ROCK8 equ 1280+8
IM_ROCK12 equ 1920+8
IM_ROCK16 equ 8-2
IM_DIAMOND0 equ 12
IM_DIAMOND4 equ 640+12
IM_DIAMOND8 equ 1280+12
IM_DIAMOND12 equ 1920+12
IM_DIAMOND16 equ 12-2
IM_MOVER0 equ 16
IM_MOVER4 equ 640+16
IM_MOVER8 equ 1280+16
IM_MOVER12 equ 1920+16
IM_MOVER16 equ 16-2
IM_BUTTERFLY0 equ 20
IM_BUTTERFLY4 equ 640+20
IM_BUTTERFLY8 equ 1280+20
IM_BUTTERFLY12 equ 1920+20
IM_BUTTERFLY16 equ 20-2
IM_TED equ 1280+2
IM_TED_LEFT0 equ 2560
IM_TED_LEFT4 equ 3200
IM_TED_LEFT8 equ 3840
IM_TED_LEFT12 equ 4480
IM_TED_RIGHT0 equ 2560+8
IM_TED_RIGHT4 equ 3200+8
IM_TED_RIGHT8 equ 3840+8
IM_TED_RIGHT12 equ 4480+8
IM_TED_DIRT_LEFT0 equ 2560+4
IM_TED_DIRT_LEFT4 equ 3200+4
IM_TED_DIRT_LEFT8 equ 3840+4
IM_TED_DIRT_LEFT12 equ 4480+4
IM_TED_DIRT_RIGHT0 equ 2560+12
IM_TED_DIRT_RIGHT4 equ 3200+12
IM_TED_DIRT_RIGHT8 equ 3840+12
IM_TED_DIRT_RIGHT12 equ 4480+12
IM_TED_ROCK_LEFT0 equ 2560+24
IM_TED_ROCK_LEFT4 equ 3200+24
IM_TED_ROCK_LEFT8 equ 3840+24
IM_TED_ROCK_LEFT12 equ 4480+24
IM_TED_ROCK_RIGHT0 equ 2560+16
IM_TED_ROCK_RIGHT4 equ 3200+16
IM_TED_ROCK_RIGHT8 equ 3840+16
IM_TED_ROCK_RIGHT12 equ 4480+16
IM_TED_DIRT_UP0 equ 5120
IM_TED_DIRT_UP4 equ 5120+2
IM_TED_DIRT_UP8 equ 5120+4
IM_TED_DIRT_UP12 equ 5120+6
IM_TED_DIRT_DOWN0 equ 5120+8
IM_TED_DIRT_DOWN4 equ 5120+10
IM_TED_DIRT_DOWN8 equ 5120+12
IM_TED_DIRT_DOWN12 equ 5120+14
IM_TED_UP0 equ 5120+24
IM_TED_UP4 equ 5120+26
IM_TED_UP8 equ 5120+28
IM_TED_UP12 equ 5120+30
IM_TED_DOWN0 equ 5120+16
IM_TED_DOWN4 equ 5120+18
IM_TED_DOWN8 equ 5120+20
IM_TED_DOWN12 equ 5120+22
IM_FUNGIS_RIGHT0 equ 24
IM_FUNGIS_RIGHT4 equ 26
IM_FUNGIS_RIGHT8 equ 28
IM_FUNGIS_LEFT0 equ 640+24
IM_FUNGIS_LEFT4 equ 640+26
IM_FUNGIS_LEFT8 equ 640+28
IM_FUNGIS_UP0 equ 1280+24
IM_FUNGIS_UP4 equ 1280+26
IM_FUNGIS_UP8 equ 1280+28
IM_FUNGIS_DOWN0 equ 1920+24
IM_FUNGIS_DOWN4 equ 1920+26
IM_FUNGIS_DOWN8 equ 1920+28
IM_BUTTERFLY_DOWN0 equ 30
IM_BUTTERFLY_DOWN4 equ 32
IM_BUTTERFLY_DOWN8 equ 34
IM_BUTTERFLY_DOWN12 equ 36
IM_MOVER_DOWN0 equ 1280+30
IM_MOVER_DOWN4 equ 1280+32
IM_MOVER_DOWN8 equ 1280+34
IM_MOVER_DOWN12 equ 1280+36
IM_MOVER_UP0 equ 2560+30
IM_MOVER_UP4 equ 2560+32
IM_MOVER_UP8 equ 2560+34
IM_MOVER_UP12 equ 2560+36
IM_BUTTERFLY_UP0 equ 3840+30
IM_BUTTERFLY_UP4 equ 3840+32
IM_BUTTERFLY_UP8 equ 3840+34
IM_BUTTERFLY_UP12 equ 3840+36
IM_ROCK_DOWN0 equ 7040
IM_ROCK_DOWN4 equ 7040+2
IM_ROCK_DOWN8 equ 7040+4
IM_ROCK_DOWN12 equ 7040+6
IM_DIAMOND_DOWN0 equ 7040+16
IM_DIAMOND_DOWN4 equ 7040+18
IM_DIAMOND_DOWN8 equ 7040+20
IM_DIAMOND_DOWN12 equ 7040+22
IM_DIGITS equ 6400
IM_GADGETS equ 8320
IM_TIME equ 6420
* Grid Object Types
G_BORDER equ -1
G_EMPTY equ 0
G_DIRT equ 1
G_ROCK equ 2
G_DIAMOND equ 3
G_BUTTERFLY equ 4
G_BRICK equ 5
G_FUNGIS equ 6
G_MOVER equ 7
G_EXIT equ 8
G_TED equ 127
* Local Data Rock
ROCK_STEADY equ 0
ROCK_MOVING equ 1
* Local Data Mover and Butterfly
MOVING_UP equ 0
MOVING_DOWN equ 1
MOVING_LEFT equ 2
MOVING_RIGHT equ 3
MOVING_NOT equ 4
* Local data for empty grid
EMPTY_REAL_EMPTY equ 0
EMPTY_OCC_ROCK equ 1
EMPTY_OCC_ROCK_DOWN equ 2
EMPTY_OCC_MOVER equ 3
EMPTY_OCC_DIAMOND equ 4
EMPTY_OCC_TED equ 5
EMPTY_OCC_FUNGIS equ 6
DEF_PROCEDURE macro
\1 equ ProcEntry
ProcEntry set ProcEntry+6
endm
* Graphics procedures
ProcEntry set 0
DEF_PROCEDURE DRAW_NOT
DEF_PROCEDURE DRAW_BORDER
DEF_PROCEDURE DRAW_EMPTY
DEF_PROCEDURE DRAW_DIRT
DEF_PROCEDURE DRAW_ROCK
DEF_PROCEDURE DRAW_DIAMOND
DEF_PROCEDURE DRAW_BUTTERFLY
DEF_PROCEDURE DRAW_BRICK
DEF_PROCEDURE DRAW_FUNGIS
DEF_PROCEDURE DRAW_MOVER
DEF_PROCEDURE DRAW_EXIT
DEF_PROCEDURE DRAW_ROCK_DOWN0
DEF_PROCEDURE DRAW_ROCK_DOWN4
DEF_PROCEDURE DRAW_ROCK_DOWN8
DEF_PROCEDURE DRAW_ROCK_DOWN12
DEF_PROCEDURE DRAW_MOVER_DOWN0
DEF_PROCEDURE DRAW_MOVER_DOWN4
DEF_PROCEDURE DRAW_MOVER_DOWN8
DEF_PROCEDURE DRAW_MOVER_DOWN12
DEF_PROCEDURE DRAW_BUTTERFLY_DOWN0
DEF_PROCEDURE DRAW_BUTTERFLY_DOWN4
DEF_PROCEDURE DRAW_BUTTERFLY_DOWN8
DEF_PROCEDURE DRAW_BUTTERFLY_DOWN12
DEF_PROCEDURE DRAW_DIAMOND_DOWN0
DEF_PROCEDURE DRAW_DIAMOND_DOWN4
DEF_PROCEDURE DRAW_DIAMOND_DOWN8
DEF_PROCEDURE DRAW_DIAMOND_DOWN12
DEF_PROCEDURE DRAW_MOVER_UP0
DEF_PROCEDURE DRAW_MOVER_UP4
DEF_PROCEDURE DRAW_MOVER_UP8
DEF_PROCEDURE DRAW_MOVER_UP12
DEF_PROCEDURE DRAW_BUTTERFLY_UP0
DEF_PROCEDURE DRAW_BUTTERFLY_UP4
DEF_PROCEDURE DRAW_BUTTERFLY_UP8
DEF_PROCEDURE DRAW_BUTTERFLY_UP12
DEF_PROCEDURE DRAW_MOVER_RIGHT0
DEF_PROCEDURE DRAW_MOVER_RIGHT4
DEF_PROCEDURE DRAW_MOVER_RIGHT8
DEF_PROCEDURE DRAW_MOVER_RIGHT12
DEF_PROCEDURE DRAW_MOVER_LEFT0
DEF_PROCEDURE DRAW_MOVER_LEFT4
DEF_PROCEDURE DRAW_MOVER_LEFT8
DEF_PROCEDURE DRAW_MOVER_LEFT12
DEF_PROCEDURE DRAW_BUTTERFLY_RIGHT0
DEF_PROCEDURE DRAW_BUTTERFLY_RIGHT4
DEF_PROCEDURE DRAW_BUTTERFLY_RIGHT8
DEF_PROCEDURE DRAW_BUTTERFLY_RIGHT12
DEF_PROCEDURE DRAW_BUTTERFLY_LEFT0
DEF_PROCEDURE DRAW_BUTTERFLY_LEFT4
DEF_PROCEDURE DRAW_BUTTERFLY_LEFT8
DEF_PROCEDURE DRAW_BUTTERFLY_LEFT12
DEF_PROCEDURE DRAW_ROCK_RIGHT0
DEF_PROCEDURE DRAW_ROCK_RIGHT4
DEF_PROCEDURE DRAW_ROCK_RIGHT8
DEF_PROCEDURE DRAW_ROCK_RIGHT12
DEF_PROCEDURE DRAW_ROCK_LEFT0
DEF_PROCEDURE DRAW_ROCK_LEFT4
DEF_PROCEDURE DRAW_ROCK_LEFT8
DEF_PROCEDURE DRAW_ROCK_LEFT12
DEF_PROCEDURE DRAW_DIAMOND_RIGHT0
DEF_PROCEDURE DRAW_DIAMOND_RIGHT4
DEF_PROCEDURE DRAW_DIAMOND_RIGHT8
DEF_PROCEDURE DRAW_DIAMOND_RIGHT12
DEF_PROCEDURE DRAW_DIAMOND_LEFT0
DEF_PROCEDURE DRAW_DIAMOND_LEFT4
DEF_PROCEDURE DRAW_DIAMOND_LEFT8
DEF_PROCEDURE DRAW_DIAMOND_LEFT12
DEF_PROCEDURE DRAW_TED
DEF_PROCEDURE DRAW_TED_DOWN0
DEF_PROCEDURE DRAW_TED_DOWN4
DEF_PROCEDURE DRAW_TED_DOWN8
DEF_PROCEDURE DRAW_TED_DOWN12
DEF_PROCEDURE DRAW_TED_UP0
DEF_PROCEDURE DRAW_TED_UP4
DEF_PROCEDURE DRAW_TED_UP8
DEF_PROCEDURE DRAW_TED_UP12
DEF_PROCEDURE DRAW_TED_LEFT0
DEF_PROCEDURE DRAW_TED_LEFT4
DEF_PROCEDURE DRAW_TED_LEFT8
DEF_PROCEDURE DRAW_TED_LEFT12
DEF_PROCEDURE DRAW_TED_RIGHT0
DEF_PROCEDURE DRAW_TED_RIGHT4
DEF_PROCEDURE DRAW_TED_RIGHT8
DEF_PROCEDURE DRAW_TED_RIGHT12
DEF_PROCEDURE DRAW_TED_DIRT_LEFT0
DEF_PROCEDURE DRAW_TED_DIRT_LEFT4
DEF_PROCEDURE DRAW_TED_DIRT_LEFT8
DEF_PROCEDURE DRAW_TED_DIRT_LEFT12
DEF_PROCEDURE DRAW_TED_DIRT_RIGHT0
DEF_PROCEDURE DRAW_TED_DIRT_RIGHT4
DEF_PROCEDURE DRAW_TED_DIRT_RIGHT8
DEF_PROCEDURE DRAW_TED_DIRT_RIGHT12
DEF_PROCEDURE DRAW_TED_ROCK_LEFT0
DEF_PROCEDURE DRAW_TED_ROCK_LEFT4
DEF_PROCEDURE DRAW_TED_ROCK_LEFT8
DEF_PROCEDURE DRAW_TED_ROCK_LEFT12
DEF_PROCEDURE DRAW_TED_ROCK_RIGHT0
DEF_PROCEDURE DRAW_TED_ROCK_RIGHT4
DEF_PROCEDURE DRAW_TED_ROCK_RIGHT8
DEF_PROCEDURE DRAW_TED_ROCK_RIGHT12
DEF_PROCEDURE DRAW_TED_DIRT_DOWN0
DEF_PROCEDURE DRAW_TED_DIRT_DOWN4
DEF_PROCEDURE DRAW_TED_DIRT_DOWN8
DEF_PROCEDURE DRAW_TED_DIRT_DOWN12
DEF_PROCEDURE DRAW_TED_DIRT_UP0
DEF_PROCEDURE DRAW_TED_DIRT_UP4
DEF_PROCEDURE DRAW_TED_DIRT_UP8
DEF_PROCEDURE DRAW_TED_DIRT_UP12
DEF_PROCEDURE DRAW_FUNGIS_RIGHT0
DEF_PROCEDURE DRAW_FUNGIS_RIGHT4
DEF_PROCEDURE DRAW_FUNGIS_RIGHT8
DEF_PROCEDURE DRAW_FUNGIS_LEFT0
DEF_PROCEDURE DRAW_FUNGIS_LEFT4
DEF_PROCEDURE DRAW_FUNGIS_LEFT8
DEF_PROCEDURE DRAW_FUNGIS_UP0
DEF_PROCEDURE DRAW_FUNGIS_UP4
DEF_PROCEDURE DRAW_FUNGIS_UP8
DEF_PROCEDURE DRAW_FUNGIS_DOWN0
DEF_PROCEDURE DRAW_FUNGIS_DOWN4
DEF_PROCEDURE DRAW_FUNGIS_DOWN8
* Transition procedures
ProcEntry set 0
DEF_PROCEDURE TRANS_NONE
DEF_PROCEDURE TRANS_DOWN
DEF_PROCEDURE TRANS_LEFT
DEF_PROCEDURE TRANS_RIGHT
DEF_PROCEDURE TRANS_UP
DEF_PROCEDURE TRANS_KILL_MOVER
DEF_PROCEDURE TRANS_KILL_BUTTERFLY
DEF_PROCEDURE TRANS_KILL_BUTTERFLY2
DEF_PROCEDURE TRANS_KILL_BUTTERFLY3
DEF_PROCEDURE TRANS_KILL_BUTTERFLY4
DEF_PROCEDURE TRANS_TO_EMPTY
DEF_PROCEDURE TRANS_TO_FUNGIS
DEF_PROCEDURE TRANS_TED_RIGHT
DEF_PROCEDURE TRANS_ROCK_RIGHT
DEF_PROCEDURE TRANS_DIAMOND_RIGHT
DEF_PROCEDURE TRANS_MOVER_RIGHT
DEF_PROCEDURE TRANS_BUTTERFLY_RIGHT
DEF_PROCEDURE TRANS_TED_LEFT
DEF_PROCEDURE TRANS_ROCK_LEFT
DEF_PROCEDURE TRANS_DIAMOND_LEFT
DEF_PROCEDURE TRANS_MOVER_LEFT
DEF_PROCEDURE TRANS_BUTTERFLY_LEFT
DEF_PROCEDURE TRANS_TED_UP
DEF_PROCEDURE TRANS_ROCK_UP
DEF_PROCEDURE TRANS_DIAMOND_UP
DEF_PROCEDURE TRANS_MOVER_UP
DEF_PROCEDURE TRANS_BUTTERFLY_UP
DEF_PROCEDURE TRANS_TED_DOWN
DEF_PROCEDURE TRANS_ROCK_DOWN
DEF_PROCEDURE TRANS_DIAMOND_DOWN
DEF_PROCEDURE TRANS_MOVER_DOWN
DEF_PROCEDURE TRANS_BUTTERFLY_DOWN
DEF_PROCEDURE TRANS_RIGHT_SCROLL_LEFT
DEF_PROCEDURE TRANS_LEFT_SCROLL_RIGHT
DEF_PROCEDURE TRANS_DOWN_SCROLL_UP
DEF_PROCEDURE TRANS_UP_SCROLL_DOWN
DEF_PROCEDURE TRANS_TED_MOVES_ROCK_LEFT
DEF_PROCEDURE TRANS_TED_MOVES_ROCK_RIGHT
DEF_PROCEDURE TRANS_TED_SCROLL_MOVES_ROCK_LEFT
DEF_PROCEDURE TRANS_TED_SCROLL_MOVES_ROCK_RIGHT
DEF_PROCEDURE TRANS_KILL_TED
* Gadget procedures
ProcEntry set 0
DEF_PROCEDURE GADGET_DIAMOND
DEF_PROCEDURE GADGET_TED
DEF_PROCEDURE GADGET_BRICK
DEF_PROCEDURE GADGET_BORDER
DEF_PROCEDURE GADGET_MOVER
DEF_PROCEDURE GADGET_ROCK
DEF_PROCEDURE GADGET_DIRT
DEF_PROCEDURE GADGET_EMPTY
DEF_PROCEDURE GADGET_BUTTERFLY
DEF_PROCEDURE GADGET_FUNGIS
DEF_PROCEDURE GADGET_FAST_LEFT
DEF_PROCEDURE GADGET_FAST_RIGHT
DEF_PROCEDURE GADGET_FAST_UP
DEF_PROCEDURE GADGET_FAST_DOWN
DEF_PROCEDURE GADGET_LEFT
DEF_PROCEDURE GADGET_RIGHT
DEF_PROCEDURE GADGET_UP
DEF_PROCEDURE GADGET_DOWN
DEF_PROCEDURE GADGET_PLAY
DEF_PROCEDURE GADGET_TEST
DEF_PROCEDURE GADGET_LOAD
DEF_PROCEDURE GADGET_SAVE
DEF_PROCEDURE GADGET_CLR
DEF_PROCEDURE GADGET_QUIT
DEF_PROCEDURE GADGET_TIME
DEF_PROCEDURE GADGET_TARGET
DEF_PROCEDURE GADGET_HELP
DEF_PROCEDURE GADGET_EXIT